import request from '@/utils/request'

export function listRole(data) {
  return request({
    url: `station/role/list`,
    method: 'post',
    data: data
  })
}

export function addRole(data) {
  return request({
    url: `station/role/add`,
    method: 'post',
    data: data
  })
}

export function updateRole(data) {
  return request({
    url: `station/role/update`,
    method: 'post',
    data: data
  })
}

export function removeRole(data) {
  return request({
    url: `station/role/remove`,
    method: 'post',
    data: data
  })
}

export function getRole(data) {
  return request({
    url: `station/role/get`,
    method: 'post',
    data: data
  })
}

export function menuTreeselect(data) {
  return request({
    url: `station/menu/treeselect`,
    method: 'post',
    data: data
  })
}

export function roleMenuTreeselect(roleId) {
  return request({
    url: `station/menu/roleMenuTreeselect/${roleId}`,
    method: 'post'
  })
}
